<?php

namespace app\company\model;

use app\common\model\BaseModel;
use app\common\model\DealerGoods;
use app\common\model\DealerGoodsSpec;
use app\common\model\Goods;
use app\common\model\GoodsSpec;
use think\model\relation\BelongsTo;

class DealerOrderDetail extends BaseModel
{
    public function orders(): BelongsTo
    {
        return $this->belongsTo(DealerOrder::class, 'dealer_order_id','id');
    }

    public function goods(): BelongsTo
    {
        return $this->belongsTo(DealerGoods::class, 'dealer_goods_id','id');
    }

    public function spec(): BelongsTo
    {
        return $this->belongsTo(DealerGoodsSpec::class, 'dealer_goods_spec_id','id');
    }
    public function goodsSpec(): BelongsTo
    {
        return $this->belongsTo(DealerGoodsSpec::class, 'dealer_goods_spec_id','id');
    }
}